<h2>Логи</h2>
<script type="text/javascript">
    $(document).ready(function(){

        $("div.main-text table tr:not(:first):odd").css("background", "#eee");    

    });

</script>     
<div class="main-text" style="width:100%">
    <?php
   
        $param = array();
        $param['limit'] = 20;
        
        $log_array = log::get( $param );
        
        if ( isset(setting::$info['check_log']) and setting::$info['check_log'] == 'false')
        {
            echo '<font color="red"><b>Логирование отключено</b></font><br>';
        }
        else
        {
            echo '<font color="green"><b>Логирование включено</b></font><br>';    
        }
                    if ( is_array($log_array) and count($log_array) > 0 )
            {
    ?>   
    <table border="0" width="100%" cellspacing="2" cellpadding="2">
        <tr class="dataTableHeadingRow" align="left">
            <td class="dataTableHeadingContent" width="100px" >Группа</td>
            <td class="dataTableHeadingContent" width="100px" >Дата</td>
            <td class="dataTableHeadingContent" width="*" >Лог</td>
          <?php  //<td class="dataTableHeadingContent" width="30px">Действие</td>   ?>
        </tr>
        <?php

                $color = '';
                $t = '';
                foreach ( $log_array as $num => $value )
                {
                    $color = $color == '#f9f9ff' ? '#F7F7F7':'#f9f9ff';
                    echo '<tr>' . "\n"; 
                    echo '<td class="dataTableContent" align="left" valign="middle">'.$value[0].'</td>'. "\n"; ;
                    $t = $value[1];
                    echo '<td class="dataTableContent" align="left" valign="middle">'.date("d.m.y", $t)." <i>".date ("H:i", $t).'</i>'.'</td>'. "\n"; ;
                    echo '<td class="dataTableContent" align="left" valign="middle">'.$value[2].'</td>'. "\n"; ;
                  //  echo '<td class="dataTableContent" align="center" valign="middle"><a class="remove"><img border="0" src="'.http_path('icons').'cross.png"></a></td>'. "\n"; ;
                    echo '</tr>';
                }
            
        ?>          
    </table>
    <?php
       }  
       else
       {
           echo 'Логи пусты';
       }
    ?>
</div>